// Project name:JavaRedis
// Creator:muhong
// Date time:2022/12/14,10:24 下午
// Name:EventExecutor

package org.gmh.util.concurrent;

/**
 * 执行器：负责具体的线程和
 */
public interface EventExecutor extends EventExecutorGroup {

    @Override
    EventExecutor next();

    EventExecutorGroup parent();

    boolean inEventLoop();

    boolean inEventLoop(Thread thread);

    <V> Promise<V> newPromise();

    <V> Future<V> newSucceededFuture(V result);

    <V> Future<V> newFailedFuture(Throwable cause);
}
